package com.example.myapplicationmusic;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private Button Create, Login;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);


        Create = (Button) findViewById(R.id.Create);
        Login = (Button) findViewById(R.id.Login);

        Create.setOnClickListener(this);
        Login.setOnClickListener(this);
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.Create: {
                //跳转到注册页面
                Intent intent=new Intent(MainActivity.this,CreateActivity.class);
                startActivity(intent);

            }
            break;

            case R.id.Login: {
                //跳转到登录页面
                Intent intent=new Intent(MainActivity.this,LoginActivity.class);
                startActivity(intent);

            }
            break;


            default:
                break;
        }
    }

}

